#include <iostream>
#include <unistd.h>
#include <signal.h>

void handler(int signo)
{
    std::cout << "signo: " << signo << std::endl;
}

int main()
{
    struct sigaction act, oact;
    act.sa_handler = handler;

    sigaction(2, &act, &oact);

    return 0;
}